package com.slwu.prototype;

public class Main {
    public static void main(String[] args) {
        PrototypeManager pm = PrototypeManager.getPrototypeManager();

        OfficialDocument doc1,doc2,doc3,doc4;

        doc1 = pm.get("far");
        doc1.display();
        doc2 = pm.get("far");
        doc2.display();
        System.out.println(doc1 == doc2);

        System.out.println("----------------------");

        doc3 = pm.get("srs");
        doc3.display();
        doc4 = pm.get("srs");
        doc4.display();
        System.out.println(doc3 == doc4);
    }
}
